package com.wenhao.test.jsontest03;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity {
	/** Called when the activity is first created. */
	private Button button;
	private String jsonData = "[{\"name\":\"wenhao\",\"age\":25},{\"name\":\"leo\",\"age\":26}]";

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.main);

		button = (Button)findViewById(R.id.mbutton);
		button.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				JsonUtils jsonUtils = new JsonUtils();
				jsonUtils.parseUserJson(jsonData);
				
			}
		});
		
	}
}